package cn.edu.zafu.bigdata.x.LiJuan;

public class Course_0104 {
    private final String courseName; //课程名
    private final String courseCode; //课程编号
    private final double credits; //课程学分
    private final String teacher; //授课教师

    //构造函数
    public Course_0104(String courseName, String courseCode, double credits, String teacher){
        this.courseName=courseName;   //参数赋值给成员变量
        this.courseCode=courseCode;
        this.credits=credits;
        this.teacher=teacher;
    }

    public void print(){
        System.out.println("课程名:"+courseName);
        System.out.println("课程编号:"+courseCode);
        System.out.println("课程学分:"+credits);
        System.out.println("授课教师:"+teacher);
    }

    public static void main(String[] args) {
        Course_0104 course=new Course_0104("Java","1234",4.0,"张三");
        course.print();
    }

}